SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
CREATE PROCEDURE [dbo].[Main_Get_Directories]
@Name VARCHAR(50)
AS 
IF (@Name = 'All')
BEGIN
	SELECT [Id], [Name],[Directory]
	FROM [dbo].[Main_Directory]
	WHERE IsActive = 1
END
ELSE
BEGIN
	SELECT [Id], [Name],[Directory]
	FROM [dbo].[Main_Directory]
	WHERE NAME = @Name
End
GO
